<?php
$spells = array(
// Extracted from 1.12 Spell.dbc file
// spellId, createdItemId, learnedSpellId
587,5349,0,
597,1113,0,
693,5232,0,
756,1253,0,
757,1254,0,
759,5514,0,
898,1450,0,
990,1114,0,
1563,0,20905,
2149,2302,0,
2152,2304,0,
2153,2303,0,
2156,2305,0,
2157,2306,0,
2158,2307,0,
2159,2308,0,
2160,2300,0,
2161,2309,0,
2162,2310,0,
2163,2311,0,
2164,2312,0,
2165,2313,0,
2166,2314,0,
2167,2315,0,
2168,2316,0,
2169,2317,0,
2329,2454,0,
2330,118,0,
2331,2455,0,
2332,2456,0,
2333,3390,0,
2334,2458,0,
2335,2459,0,
2336,2460,0,
2337,858,0,
2362,5522,0,
2385,2568,0,
2386,2569,0,
2387,2570,0,
2389,2572,0,
2392,2575,0,
2393,2576,0,
2394,2577,0,
2395,2578,0,
2396,2579,0,
2397,2580,0,
2399,2582,0,
2401,2583,0,
2402,2584,0,
2403,2585,0,
2406,2587,0,
2538,2679,0,
2539,2680,0,
2540,2681,0,
2541,2684,0,
2542,724,0,
2543,733,0,
2544,2683,0,
2545,2682,0,
2546,2687,0,
2547,1082,0,
2548,2685,0,
2549,1017,0,
2657,2840,0,
2658,2842,0,
2659,2841,0,
2660,2862,0,
2661,2851,0,
2662,2852,0,
2663,2853,0,
2664,2854,0,
2665,2863,0,
2666,2857,0,
2667,2864,0,
2668,2865,0,
2670,2866,0,
2671,2867,0,
2672,2868,0,
2673,2869,0,
2674,2871,0,
2675,2870,0,
2737,2844,0,
2738,2845,0,
2739,2847,0,
2740,2848,0,
2741,2849,0,
2742,2850,0,
2795,2888,0,
2835,2892,0,
2837,2893,0,
2838,2895,0,
2840,2896,0,
2841,2927,0,
2881,2318,0,
2963,2996,0,
2964,2997,0,
3115,3239,0,
3116,3240,0,
3117,3241,0,
3170,3382,0,
3171,3383,0,
3172,3384,0,
3173,3385,0,
3174,3386,0,
3175,3387,0,
3176,3388,0,
3177,3389,0,
3188,3391,0,
3230,2457,0,
3275,1251,0,
3276,2581,0,
3277,3530,0,
3278,3531,0,
3292,3487,0,
3293,3488,0,
3294,3489,0,
3295,3490,0,
3296,3491,0,
3297,3492,0,
3304,3576,0,
3307,3575,0,
3308,3577,0,
3319,3469,0,
3320,3470,0,
3321,3471,0,
3323,3472,0,
3324,3473,0,
3325,3474,0,
3326,3478,0,
3328,3480,0,
3330,3481,0,
3331,3482,0,
3333,3483,0,
3334,3484,0,
3336,3485,0,
3337,3486,0,
3370,3662,0,
3371,3220,0,
3372,3663,0,
3373,3664,0,
3376,3665,0,
3377,3666,0,
3397,3726,0,
3398,3727,0,
3399,3728,0,
3400,3729,0,
3420,3775,0,
3421,3776,0,
3447,929,0,
3448,3823,0,
3449,3824,0,
3450,3825,0,
3451,3826,0,
3452,3827,0,
3453,3828,0,
3454,3829,0,
3491,3848,0,
3492,3849,0,
3493,3850,0,
3494,3851,0,
3495,3852,0,
3496,3853,0,
3497,3854,0,
3498,3855,0,
3500,3856,0,
3501,3835,0,
3502,3836,0,
3503,3837,0,
3504,3840,0,
3505,3841,0,
3506,3842,0,
3507,3843,0,
3508,3844,0,
3511,3845,0,
3513,3846,0,
3515,3847,0,
3552,5513,0,
3569,3859,0,
3723,0,28609,
3753,4237,0,
3755,4238,0,
3756,4239,0,
3757,4240,0,
3758,4241,0,
3759,4242,0,
3760,3719,0,
3761,4243,0,
3762,4244,0,
3763,4246,0,
3764,4247,0,
3765,4248,0,
3766,4249,0,
3767,4250,0,
3768,4251,0,
3769,4252,0,
3770,4253,0,
3771,4254,0,
3772,4255,0,
3773,4256,0,
3774,4257,0,
3775,4258,0,
3776,4259,0,
3777,4260,0,
3778,4262,0,
3779,4264,0,
3780,4265,0,
3813,4245,0,
3816,4231,0,
3817,4233,0,
3818,4236,0,
3839,4305,0,
3840,4307,0,
3841,4308,0,
3842,4309,0,
3843,4310,0,
3844,4311,0,
3845,4312,0,
3847,4313,0,
3848,4314,0,
3849,4315,0,
3850,4316,0,
3851,4317,0,
3852,4318,0,
3854,4319,0,
3855,4320,0,
3856,4321,0,
3857,4322,0,
3858,4323,0,
3859,4324,0,
3860,4325,0,
3861,4326,0,
3862,4327,0,
3863,4328,0,
3864,4329,0,
3865,4339,0,
3866,4330,0,
3868,4331,0,
3869,4332,0,
3870,4333,0,
3871,4334,0,
3872,4335,0,
3873,4336,0,
3914,4343,0,
3915,4344,0,
3918,4357,0,
3919,4358,0,
3920,8067,0,
3921,2518,0,
3922,4359,0,
3923,4360,0,
3924,4361,0,
3925,4362,0,
3926,4363,0,
3928,4401,0,
3929,4364,0,
3930,8068,0,
3931,4365,0,
3932,4366,0,
3933,4367,0,
3934,4368,0,
3936,4369,0,
3937,4370,0,
3938,4371,0,
3939,4372,0,
3940,4373,0,
3941,4374,0,
3942,4375,0,
3944,4376,0,
3945,4377,0,
3946,4378,0,
3947,8069,0,
3949,4379,0,
3950,4380,0,
3952,4381,0,
3953,4382,0,
3954,4383,0,
3955,4384,0,
3956,4385,0,
3957,4386,0,
3958,4387,0,
3959,4388,0,
3960,4403,0,
3961,4389,0,
3962,4390,0,
3963,4391,0,
3964,3034,0,
3965,4392,0,
3966,4393,0,
3967,4394,0,
3968,4395,0,
3969,4396,0,
3971,4397,0,
3972,4398,0,
3973,4404,0,
3977,4405,0,
3978,4406,0,
3979,4407,0,
4094,4457,0,
4096,4455,0,
4097,4456,0,
4508,4596,0,
4942,4623,0,
4954,4703,0,
4960,1450,0,
4976,5184,0,
5244,5081,0,
5395,5172,0,
5504,5350,0,
5505,2288,0,
5506,2136,0,
5701,5510,0,
5763,5237,0,
6127,3772,0,
6129,1487,0,
6176,0,20658,
6177,0,20660,
6310,5455,0,
6366,1254,0,
6412,5472,0,
6413,5473,0,
6414,5474,0,
6415,5476,0,
6416,5477,0,
6417,5478,0,
6418,5479,0,
6419,5480,0,
6441,5105,0,
6458,5507,0,
6470,5517,0,
6471,5518,0,
6499,5525,0,
6500,5527,0,
6501,5526,0,
6510,5530,0,
6517,5540,0,
6518,5541,0,
6521,5542,0,
6609,5639,0,
6610,5645,0,
6611,5646,0,
6617,5631,0,
6618,5633,0,
6619,5632,0,
6624,5634,0,
6651,5654,0,
6661,5739,0,
6686,5762,0,
6688,5763,0,
6690,5766,0,
6692,5770,0,
6693,5764,0,
6695,5765,0,
6702,5780,0,
6703,5781,0,
6704,5782,0,
6705,5783,0,
6803,5868,0,
7126,5957,0,
7133,5958,0,
7135,5961,0,
7147,5962,0,
7149,5963,0,
7151,5964,0,
7153,5965,0,
7156,5966,0,
7179,5996,0,
7181,1710,0,
7183,5997,0,
7213,6038,0,
7221,6042,0,
7222,6043,0,
7223,6040,0,
7224,6041,0,
7255,6051,0,
7256,6048,0,
7257,6049,0,
7258,6050,0,
7259,6052,0,
7364,6182,0,
7408,6214,0,
7421,6218,0,
7430,6219,0,
7623,6238,0,
7624,6241,0,
7629,6239,0,
7630,6240,0,
7633,6242,0,
7636,6243,0,
7639,6263,0,
7643,6264,0,
7751,6290,0,
7752,787,0,
7753,4592,0,
7754,6316,0,
7755,4593,0,
7795,6339,0,
7817,6350,0,
7818,6338,0,
7827,5095,0,
7828,4594,0,
7836,6370,0,
7837,6371,0,
7841,6372,0,
7845,6373,0,
7892,6384,0,
7893,6385,0,
7928,6450,0,
7929,6451,0,
7934,6452,0,
7935,6453,0,
7953,6466,0,
7954,6467,0,
7955,6468,0,
7960,5349,0,
8238,6657,0,
8240,6662,0,
8243,4852,0,
8296,2840,0,
8322,6709,0,
8334,6712,0,
8339,6714,0,
8366,6730,0,
8367,6731,0,
8368,6733,0,
8465,6786,0,
8467,6787,0,
8483,6795,0,
8489,6796,0,
8604,6888,0,
8607,6890,0,
8681,6947,0,
8687,6949,0,
8691,6950,0,
8694,6951,0,
8736,5349,0,
8758,7046,0,
8760,7048,0,
8762,7050,0,
8764,7051,0,
8766,7052,0,
8768,7071,0,
8770,7054,0,
8772,7055,0,
8774,7057,0,
8776,7026,0,
8778,7027,0,
8780,7047,0,
8782,7049,0,
8784,7065,0,
8786,7053,0,
8789,7056,0,
8791,7058,0,
8793,7059,0,
8795,7060,0,
8797,7061,0,
8799,7062,0,
8802,7063,0,
8804,7064,0,
8854,7134,0,
8855,7135,0,
8880,7166,0,
8895,7189,0,
8919,7206,0,
9052,7268,0,
9058,7276,0,
9059,7277,0,
9060,7278,0,
9062,7279,0,
9064,7280,0,
9065,7281,0,
9068,7282,0,
9070,7283,0,
9072,7284,0,
9074,7285,0,
9145,7348,0,
9146,7349,0,
9147,7352,0,
9148,7358,0,
9149,7359,0,
9193,7371,0,
9194,7372,0,
9195,7373,0,
9196,7374,0,
9197,7375,0,
9198,7377,0,
9201,7378,0,
9202,7386,0,
9206,7387,0,
9207,7390,0,
9208,7391,0,
9269,7506,0,
9271,6533,0,
9273,7148,0,
9513,7676,0,
9582,5639,0,
9583,7771,0,
9584,7770,0,
9586,7769,0,
9594,7733,0,
9595,7733,0,
9811,7913,0,
9813,7914,0,
9814,7915,0,
9818,7916,0,
9820,7917,0,
9916,7963,0,
9918,7964,0,
9920,7966,0,
9921,7965,0,
9926,7918,0,
9928,7919,0,
9931,7920,0,
9933,7921,0,
9935,7922,0,
9937,7924,0,
9939,7967,0,
9942,7925,0,
9945,7926,0,
9949,5060,0,
9950,7927,0,
9952,7928,0,
9954,7938,0,
9957,7929,0,
9959,7930,0,
9961,7931,0,
9964,7969,0,
9966,7932,0,
9968,7933,0,
9970,7934,0,
9972,7935,0,
9974,7939,0,
9977,7970,0,
9979,7936,0,
9980,7937,0,
9983,7955,0,
9985,7956,0,
9986,7957,0,
9987,7958,0,
9993,7941,0,
9995,7942,0,
9997,7943,0,
10001,7945,0,
10003,7954,0,
10005,7944,0,
10007,7961,0,
10009,7946,0,
10011,7959,0,
10013,7947,0,
10015,7960,0,
10053,8007,0,
10054,8008,0,
10097,3860,0,
10098,6037,0,
10138,8077,0,
10139,8078,0,
10140,8079,0,
10144,8075,0,
10145,8076,0,
10321,0,20271,
10482,8172,0,
10487,8173,0,
10490,8174,0,
10499,8175,0,
10507,8176,0,
10509,8187,0,
10511,8189,0,
10516,8192,0,
10518,8198,0,
10520,8200,0,
10525,8203,0,
10529,8210,0,
10531,8201,0,
10533,8205,0,
10542,8204,0,
10544,8211,0,
10546,8214,0,
10548,8193,0,
10550,8195,0,
10552,8191,0,
10554,8209,0,
10556,8185,0,
10558,8197,0,
10560,8202,0,
10562,8216,0,
10564,8207,0,
10566,8213,0,
10568,8206,0,
10570,8208,0,
10572,8212,0,
10574,8215,0,
10619,8347,0,
10621,8345,0,
10630,8346,0,
10632,8348,0,
10647,8349,0,
10650,8367,0,
10840,8544,0,
10841,8545,0,
10844,8546,0,
11209,8708,0,
11341,8926,0,
11342,8927,0,
11343,8928,0,
11357,8984,0,
11358,8985,0,
11400,9186,0,
11435,9240,0,
11438,9254,0,
11447,8827,0,
11448,6149,0,
11449,8949,0,
11450,8951,0,
11451,8956,0,
11452,9030,0,
11453,9036,0,
11454,9060,0,
11456,9061,0,
11457,3928,0,
11458,9144,0,
11459,9149,0,
11460,9154,0,
11461,9155,0,
11464,9172,0,
11465,9179,0,
11466,9088,0,
11467,9187,0,
11468,9197,0,
11472,9206,0,
11473,9210,0,
11476,9264,0,
11477,9224,0,
11478,9233,0,
11479,3577,0,
11480,6037,0,
11512,9280,0,
11513,9284,0,
11525,9282,0,
11528,9281,0,
11537,9306,0,
11545,9316,0,
11637,9365,0,
11643,9366,0,
11651,9380,0,
11652,9379,0,
11654,9372,0,
11758,8585,0,
11759,9440,0,
11760,9441,0,
11761,9438,0,
11884,9593,0,
11923,9718,0,
12044,10045,0,
12045,10046,0,
12046,10047,0,
12047,10048,0,
12048,9998,0,
12049,9999,0,
12050,10001,0,
12052,10002,0,
12053,10003,0,
12055,10004,0,
12056,10007,0,
12059,10008,0,
12060,10009,0,
12061,10056,0,
12062,10010,0,
12063,10011,0,
12064,10052,0,
12065,10050,0,
12066,10018,0,
12067,10019,0,
12068,10020,0,
12069,10042,0,
12070,10021,0,
12071,10023,0,
12072,10024,0,
12073,10026,0,
12074,10027,0,
12075,10054,0,
12076,10028,0,
12077,10053,0,
12078,10029,0,
12079,10051,0,
12080,10055,0,
12081,10030,0,
12082,10031,0,
12083,10032,0,
12084,10033,0,
12085,10034,0,
12086,10025,0,
12087,10038,0,
12088,10044,0,
12089,10035,0,
12090,10039,0,
12091,10040,0,
12092,10041,0,
12093,10036,0,
12259,10423,0,
12260,10421,0,
12578,10589,0,
12584,10558,0,
12585,10505,0,
12586,10507,0,
12587,10499,0,
12589,10559,0,
12590,10498,0,
12591,10560,0,
12594,10500,0,
12595,10508,0,
12596,10512,0,
12597,10546,0,
12599,10561,0,
12603,10514,0,
12607,10501,0,
12609,10592,0,
12614,10510,0,
12615,10502,0,
12616,10518,0,
12617,10506,0,
12618,10503,0,
12619,10562,0,
12620,10548,0,
12621,10513,0,
12622,10504,0,
12624,10576,0,
12715,10644,0,
12716,10577,0,
12717,10542,0,
12718,10543,0,
12719,10579,0,
12720,10580,0,
12722,10585,0,
12735,10662,0,
12754,10586,0,
12755,10587,0,
12758,10588,0,
12759,10645,0,
12760,10646,0,
12802,10691,0,
12805,10692,0,
12806,10693,0,
12808,10694,0,
12895,10713,0,
12897,10545,0,
12899,10716,0,
12900,10719,0,
12902,10720,0,
12903,10721,0,
12904,10723,0,
12905,10724,0,
12906,10725,0,
12907,10726,0,
12908,10727,0,
12998,10818,0,
13028,10841,0,
13220,10918,0,
13228,10920,0,
13229,10921,0,
13230,10922,0,
13240,10577,0,
13325,9173,0,
13361,10939,0,
13362,10938,0,
13399,11024,0,
13497,11082,0,
13498,10998,0,
13628,11130,0,
13630,11131,0,
13632,11135,0,
13633,11134,0,
13702,11145,0,
13714,11149,0,
13739,11175,0,
13740,11174,0,
13909,11522,0,
13982,11230,0,
14199,11149,0,
14209,11270,0,
14210,11282,0,
14227,11283,0,
14293,11287,0,
14379,11128,0,
14380,11144,0,
14807,11288,0,
14809,11289,0,
14810,11290,0,
14891,11371,0,
14929,11413,0,
14930,8217,0,
14932,8218,0,
15065,11470,0,
15120,11511,0,
15187,9307,0,
15211,11482,0,
15247,11582,0,
15255,11590,0,
15292,11608,0,
15293,11606,0,
15294,11607,0,
15295,11605,0,
15296,11604,0,
15303,11149,0,
15304,11149,0,
15342,11950,0,
15343,11951,0,
15344,11952,0,
15491,5646,0,
15539,10464,0,
15596,11811,0,
15628,11825,0,
15633,11826,0,
15649,12567,0,
15698,11947,0,
15699,11949,0,
15702,11954,0,
15833,12190,0,
15853,12209,0,
15855,12210,0,
15856,13851,0,
15861,12212,0,
15863,12213,0,
15865,12214,0,
15906,12217,0,
15910,12215,0,
15915,12216,0,
15933,12218,0,
15935,12224,0,
15972,12259,0,
15973,12260,0,
16029,12144,0,
16073,12347,0,
16077,12349,0,
16153,12359,0,
16195,12443,0,
16197,12442,0,
16351,12384,0,
16548,12563,0,
16639,12644,0,
16640,12643,0,
16641,12404,0,
16642,12405,0,
16643,12406,0,
16644,12408,0,
16645,12416,0,
16646,12428,0,
16647,12424,0,
16648,12415,0,
16649,12425,0,
16650,12624,0,
16651,12645,0,
16652,12409,0,
16653,12410,0,
16654,12418,0,
16655,12631,0,
16656,12419,0,
16657,12426,0,
16658,12427,0,
16659,12417,0,
16660,12625,0,
16661,12632,0,
16662,12414,0,
16663,12422,0,
16664,12610,0,
16665,12611,0,
16667,12628,0,
16724,12633,0,
16725,12420,0,
16726,12612,0,
16728,12636,0,
16729,12640,0,
16730,12429,0,
16731,12613,0,
16732,12614,0,
16741,12639,0,
16742,12620,0,
16744,12619,0,
16745,12618,0,
16746,12641,0,
16781,12723,0,
16960,12764,0,
16965,12769,0,
16967,12772,0,
16969,12773,0,
16970,12774,0,
16971,12775,0,
16973,12776,0,
16978,12777,0,
16980,12779,0,
16983,12781,0,
16984,12792,0,
16985,12782,0,
16986,12795,0,
16987,12802,0,
16988,12796,0,
16990,12790,0,
16991,12798,0,
16992,12797,0,
16993,12794,0,
16994,12784,0,
16995,12783,0,
17048,12847,0,
17133,12885,0,
17161,12907,0,
17180,12655,0,
17181,12810,0,
17187,12360,0,
17269,13155,0,
17270,13159,0,
17527,5633,0,
17529,13370,0,
17551,13423,0,
17552,13442,0,
17553,13443,0,
17554,13445,0,
17555,13447,0,
17556,13446,0,
17557,13453,0,
17559,7078,0,
17560,7076,0,
17561,7080,0,
17562,7082,0,
17563,7080,0,
17564,12808,0,
17565,7076,0,
17566,12803,0,
17570,13455,0,
17571,13452,0,
17572,13462,0,
17573,13454,0,
17574,13457,0,
17575,13456,0,
17576,13458,0,
17577,13461,0,
17578,13459,0,
17579,13460,0,
17580,13444,0,
17632,13503,0,
17634,13506,0,
17635,13510,0,
17636,13511,0,
17637,13512,0,
17638,13513,0,
17672,13544,0,
17727,13602,0,
17728,13603,0,
17777,12846,0,
17951,13699,0,
17952,13700,0,
17953,13701,0,
18238,6887,0,
18239,13927,0,
18240,13928,0,
18241,13930,0,
18242,13929,0,
18243,13931,0,
18244,13932,0,
18245,13933,0,
18246,13934,0,
18247,13935,0,
18367,12368,0,
18397,14339,0,
18401,14048,0,
18402,13856,0,
18403,13869,0,
18404,13868,0,
18405,14046,0,
18406,13858,0,
18407,13857,0,
18408,14042,0,
18409,13860,0,
18410,14143,0,
18411,13870,0,
18412,14043,0,
18413,14142,0,
18414,14100,0,
18415,14101,0,
18416,14141,0,
18417,13863,0,
18418,14044,0,
18419,14107,0,
18420,14103,0,
18421,14132,0,
18422,14134,0,
18423,13864,0,
18424,13871,0,
18434,14045,0,
18436,14136,0,
18437,14108,0,
18438,13865,0,
18439,14104,0,
18440,14137,0,
18441,14144,0,
18442,14111,0,
18444,13866,0,
18445,14155,0,
18446,14128,0,
18447,14138,0,
18448,14139,0,
18449,13867,0,
18450,14130,0,
18451,14106,0,
18452,14140,0,
18453,14112,0,
18454,14146,0,
18455,14156,0,
18456,14154,0,
18457,14152,0,
18458,14153,0,
18560,14342,0,
18629,14529,0,
18630,14530,0,
18711,14645,0,
18831,14894,0,
18887,9319,0,
18988,15209,0,
19029,15448,0,
19047,15407,0,
19048,15077,0,
19049,15083,0,
19050,15045,0,
19051,15076,0,
19052,15084,0,
19053,15074,0,
19054,15047,0,
19055,15091,0,
19058,15564,0,
19059,15054,0,
19060,15046,0,
19061,15061,0,
19062,15067,0,
19063,15073,0,
19064,15078,0,
19065,15092,0,
19066,15071,0,
19067,15057,0,
19068,15064,0,
19070,15082,0,
19071,15086,0,
19072,15093,0,
19073,15072,0,
19074,15069,0,
19075,15079,0,
19076,15053,0,
19077,15048,0,
19078,15060,0,
19079,15056,0,
19080,15065,0,
19081,15075,0,
19082,15094,0,
19083,15087,0,
19084,15063,0,
19085,15050,0,
19086,15066,0,
19087,15070,0,
19088,15080,0,
19089,15049,0,
19090,15058,0,
19091,15095,0,
19092,15088,0,
19093,15138,0,
19094,15051,0,
19095,15059,0,
19097,15062,0,
19098,15085,0,
19100,15081,0,
19101,15055,0,
19102,15090,0,
19103,15096,0,
19104,15068,0,
19106,15141,0,
19107,15052,0,
19435,15802,0,
19564,15845,0,
19565,15843,0,
19566,15409,0,
19567,15846,0,
19666,15869,0,
19667,15870,0,
19668,15871,0,
19669,15872,0,
19720,15885,0,
19788,15992,0,
19790,15993,0,
19791,15994,0,
19792,15995,0,
19793,15996,0,
19794,15999,0,
19795,16000,0,
19796,16004,0,
19797,10515,0,
19799,16005,0,
19800,15997,0,
19814,16023,0,
19815,16006,0,
19819,16009,0,
19825,16008,0,
19830,16022,0,
19831,16040,0,
19833,16007,0,
20018,9421,0,
20022,5232,0,
20039,16203,0,
20040,16202,0,
20044,0,20043,
20051,16207,0,
20065,0,20008,
20067,0,20020,
20068,0,20014,
20069,0,20017,
20070,0,20009,
20071,0,20012,
20072,0,20024,
20073,0,20026,
20074,0,20016,
20075,0,20029,
20076,0,20015,
20077,0,20028,
20078,0,20051,
20079,0,20013,
20080,0,20023,
20081,0,20010,
20082,0,20030,
20083,0,20033,
20084,0,20036,
20085,0,20031,
20086,0,20011,
20087,0,20034,
20088,0,20025,
20089,0,20032,
20090,0,20035,
20191,0,20190,
20201,16206,0,
20202,0,20201,
20220,0,20219,
20221,0,20222,
20437,0,20287,
20438,0,20288,
20439,0,20289,
20440,0,20290,
20441,0,20291,
20442,0,20292,
20443,0,20293,
20444,0,20162,
20445,0,20305,
20446,0,20306,
20447,0,20307,
20448,0,20308,
20450,0,25780,
20451,0,20419,
20452,0,20421,
20453,0,20422,
20454,0,20423,
20455,0,20165,
20456,0,20347,
20457,0,20348,
20458,0,20349,
20459,0,20166,
20460,0,20356,
20461,0,20357,
20462,0,20164,
20485,0,20484,
20529,16642,0,
20530,16643,0,
20531,16644,0,
20561,0,20559,
20562,0,20560,
20571,0,20569,
20611,0,20252,
20613,0,20608,
20621,0,20616,
20622,0,20617,
20626,16766,0,
20628,0,20626,
20648,2319,0,
20649,4234,0,
20650,4304,0,
20651,0,20648,
20652,0,20649,
20653,0,20650,
20693,16787,0,
20703,0,20661,
20704,0,20662,
20722,0,20719,
20724,0,20230,
20730,0,20729,
20738,0,20736,
20744,0,20739,
20745,0,20742,
20749,0,20747,
20750,0,20748,
20752,16892,0,
20755,16893,0,
20756,16895,0,
20757,16896,0,
20766,0,20752,
20767,0,20755,
20768,0,20756,
20769,0,20757,
20771,0,20770,
20774,0,20772,
20775,0,20773,
20778,0,20609,
20779,0,20610,
20780,0,20776,
20781,0,20777,
20814,16973,0,
20848,16980,0,
20849,16979,0,
20850,0,20848,
20851,0,20849,
20852,0,20853,
20853,16982,0,
20854,16983,0,
20855,16984,0,
20856,0,20854,
20857,0,20855,
20872,16989,0,
20873,16988,0,
20874,17014,0,
20876,17013,0,
20878,0,20872,
20879,0,20873,
20880,0,20874,
20881,0,20876,
20890,17015,0,
20897,17016,0,
20898,0,20890,
20899,0,20897,
20916,8364,0,
20917,0,20895,
20921,0,20916,
20926,0,20896,
20931,0,20900,
20932,0,20901,
20933,0,20902,
20934,0,20903,
20935,0,20904,
20938,0,20906,
20940,0,24132,
20941,0,24133,
20942,0,20909,
20943,0,20910,
20944,0,20915,
20945,0,20918,
20946,0,20919,
20947,0,20920,
20948,0,20911,
20949,0,20912,
20950,0,20913,
20951,0,20914,
20952,0,20922,
20953,0,20923,
20954,0,20924,
20955,0,20925,
20956,0,20927,
20957,0,20928,
20958,0,20929,
20960,0,20930,
21029,7867,0,
21083,0,21082,
21085,0,21084,
21100,17126,0,
21143,17197,0,
21144,17198,0,
21145,0,21143,
21146,0,21144,
21160,17182,0,
21161,17193,0,
21164,0,21161,
21175,17222,0,
21176,0,21175,
21356,17324,0,
21357,17333,0,
21368,17325,0,
21372,17323,0,
21398,17353,0,
21464,17362,0,
21465,17363,0,
21541,17224,0,
21542,17364,0,
21555,0,21551,
21557,0,21552,
21558,0,21553,
21567,0,21560,
21568,0,21562,
21569,0,21564,
21654,17442,0,
21731,17505,0,
21732,17507,0,
21734,17506,0,
21735,17506,0,
21851,0,21849,
21852,0,21850,
21884,17696,0,
21913,17704,0,
21915,0,21913,
21923,17708,0,
21924,0,21923,
21933,0,21931,
21935,17202,0,
21939,17191,0,
21940,17716,0,
21941,0,21940,
21943,17721,0,
21944,0,21943,
21945,17723,0,
21946,0,21945,
21953,17735,0,
21957,17758,0,
21979,17781,0,
22108,17690,0,
22109,17905,0,
22110,17906,0,
22111,17907,0,
22112,17908,0,
22113,17909,0,
22114,17691,0,
22115,17900,0,
22116,17901,0,
22117,17902,0,
22118,17903,0,
22119,17904,0,
22190,8051,0,
22207,16309,0,
22208,2756,0,
22209,2757,0,
22210,2758,0,
22211,2759,0,
22227,5462,0,
22331,8170,0,
22332,0,22331,
22430,17967,0,
22432,0,22430,
22434,17968,0,
22435,0,22434,
22480,18045,0,
22481,0,22480,
22562,18151,0,
22565,11320,0,
22569,0,22568,
22571,0,22570,
22704,18232,0,
22705,0,22704,
22711,18238,0,
22712,0,22711,
22727,18251,0,
22728,0,22727,
22732,18253,0,
22733,0,22732,
22753,0,22749,
22754,0,22750,
22757,18262,0,
22758,0,22757,
22759,18263,0,
22760,0,22759,
22761,18254,0,
22762,0,22761,
22784,0,22782,
22785,0,22783,
22793,18283,0,
22794,0,22793,
22795,18282,0,
22796,0,22795,
22797,18168,0,
22798,0,22797,
22808,18294,0,
22809,0,22808,
22813,18258,0,
22814,0,22813,
22815,18258,0,
22816,0,22815,
22826,0,22812,
22830,0,22827,
22831,0,22828,
22832,0,22829,
22837,7586,0,
22864,0,22704,
22866,18405,0,
22867,18407,0,
22868,18408,0,
22869,18409,0,
22870,18413,0,
22871,0,22866,
22872,0,22867,
22873,0,22868,
22874,0,22869,
22875,0,22870,
22894,0,22842,
22897,0,22895,
22898,0,22896,
22902,18486,0,
22903,0,22902,
22906,18492,0,
22921,18504,0,
22922,18506,0,
22923,18508,0,
22925,18513,0,
22926,18509,0,
22927,18510,0,
22928,18511,0,
22929,0,22921,
22930,0,22922,
22931,0,22923,
22932,0,22926,
22933,0,22927,
22934,0,22928,
22941,11286,0,
22942,15875,0,
22943,8432,0,
22944,8095,0,
22949,18540,0,
22958,19016,0,
22967,17771,0,
22968,0,22967,
22989,18583,0,
22990,18582,0,
22991,18584,0,
23007,0,21161,
23029,0,23027,
23030,0,23028,
23059,18628,0,
23065,18640,0,
23066,9318,0,
23067,9312,0,
23068,9313,0,
23069,18588,0,
23070,18641,0,
23071,18631,0,
23077,18634,0,
23078,18587,0,
23079,18637,0,
23080,18594,0,
23081,18638,0,
23082,18639,0,
23083,0,23066,
23084,0,23067,
23085,0,23068,
23086,0,23069,
23087,0,23069,
23088,0,23071,
23089,0,23077,
23090,0,23078,
23091,0,23079,
23092,0,23080,
23093,0,23081,
23094,0,23082,
23095,0,23070,
23096,18645,0,
23098,0,23096,
23100,0,23099,
23111,0,23109,
23112,0,23110,
23122,18642,0,
23123,18643,0,
23124,18598,0,
23125,18597,0,
23129,18660,0,
23130,0,23129,
23135,18662,0,
23146,0,23145,
23149,0,23147,
23150,0,23148,
23151,18608,0,
23160,0,23161,
23163,0,23162,
23166,0,23164,
23167,0,23165,
23190,18662,0,
23191,0,23190,
23192,18713,0,
23193,20487,0,
23194,20488,0,
23215,0,23214,
23231,18769,0,
23232,18770,0,
23233,18771,0,
23254,18799,0,
23304,18775,0,
23399,18948,0,
23400,0,23399,
23464,6265,0,
23486,18984,0,
23489,18986,0,
23490,0,23486,
23491,0,23489,
23507,19026,0,
23508,0,23507,
23517,5512,0,
23518,19004,0,
23519,19005,0,
23520,5511,0,
23521,19006,0,
23522,19007,0,
23628,19043,0,
23629,19048,0,
23630,0,23628,
23631,0,23629,
23632,19051,0,
23633,19057,0,
23634,0,23632,
23635,0,23633,
23636,19148,0,
23637,19164,0,
23638,19166,0,
23639,19167,0,
23640,0,23638,
23641,0,23639,
23647,0,23198,
23650,19170,0,
23651,0,23650,
23652,19168,0,
23653,19169,0,
23654,0,23652,
23655,0,23653,
23656,0,23636,
23657,0,23637,
23661,19213,0,
23662,19047,0,
23663,19050,0,
23664,19056,0,
23665,19059,0,
23666,19156,0,
23667,19165,0,
23668,0,23662,
23669,0,23663,
23670,0,23664,
23671,0,23665,
23672,0,23666,
23673,0,23667,
23677,19228,0,
23678,19257,0,
23679,19267,0,
23680,19277,0,
23702,19322,0,
23703,19044,0,
23704,19049,0,
23705,19052,0,
23706,19058,0,
23707,19149,0,
23708,19157,0,
23709,19162,0,
23710,19163,0,
23711,0,23703,
23712,0,23705,
23713,0,23704,
23714,0,23706,
23715,0,23707,
23716,0,23708,
23717,0,23709,
23718,0,23710,
23765,19422,0,
23787,19440,0,
23788,0,23787,
23805,0,23799,
23806,0,23800,
23807,0,23801,
23808,0,23802,
23809,0,23803,
23810,0,23804,
23813,19008,0,
23814,19009,0,
23815,5509,0,
23816,19010,0,
23817,19011,0,
23818,5510,0,
23819,9421,0,
23820,19012,0,
23821,19013,0,
23851,19450,0,
23898,0,23892,
23899,0,23893,
23900,0,23894,
23926,0,23923,
23927,0,23924,
23928,0,23925,
23975,19642,0,
23998,19574,0,
23999,19575,0,
24000,19576,0,
24001,19577,0,
24006,19696,0,
24007,19579,0,
24008,19585,0,
24009,19586,0,
24010,19588,0,
24012,19591,0,
24013,19592,0,
24014,19593,0,
24015,19594,0,
24017,19725,0,
24038,19598,0,
24039,19599,0,
24040,19600,0,
24041,19601,0,
24044,19602,0,
24045,19603,0,
24046,19604,0,
24047,19605,0,
24055,19610,0,
24056,19611,0,
24059,19612,0,
24060,19613,0,
24067,19606,0,
24068,19607,0,
24069,19608,0,
24070,19609,0,
24072,19614,0,
24073,19615,0,
24074,19616,0,
24075,19617,0,
24076,19618,0,
24077,19619,0,
24078,19620,0,
24079,19621,0,
24091,19682,0,
24092,19683,0,
24093,19684,0,
24094,0,24091,
24095,0,24092,
24096,0,24093,
24121,19685,0,
24122,19686,0,
24123,19687,0,
24124,19688,0,
24125,19689,0,
24126,0,24121,
24127,0,24122,
24128,0,24123,
24129,0,24124,
24130,0,24125,
24136,19690,0,
24137,19691,0,
24138,19692,0,
24139,19693,0,
24140,19694,0,
24141,19695,0,
24142,0,24136,
24143,0,24137,
24144,0,24138,
24145,0,24139,
24146,0,24140,
24147,0,24141,
24179,13209,0,
24201,19812,0,
24245,19880,0,
24263,19932,0,
24266,19931,0,
24267,0,24266,
24276,0,24275,
24277,0,24274,
24278,0,24239,
24279,19955,0,
24280,19953,0,
24281,19954,0,
24282,19959,0,
24284,19958,0,
24285,19952,0,
24288,19956,0,
24289,19951,0,
24290,19957,0,
24304,19974,0,
24356,19999,0,
24357,19998,0,
24358,0,24356,
24359,0,24357,
24365,20007,0,
24366,20002,0,
24367,20008,0,
24368,20004,0,
24369,0,24365,
24370,0,24366,
24372,0,24367,
24373,0,24368,
24377,19858,0,
24399,20039,0,
24400,0,24399,
24418,20074,0,
24419,0,24418,
24424,0,24423,
24440,0,23992,
24441,0,24439,
24442,0,24440,
24451,0,24450,
24454,0,24452,
24455,0,24453,
24463,0,24444,
24464,0,24445,
24468,0,24441,
24470,0,24463,
24472,0,24464,
24473,0,24475,
24475,0,24446,
24476,0,24447,
24477,0,24448,
24478,0,24449,
24481,0,24476,
24484,0,24477,
24485,0,24478,
24490,0,24488,
24494,0,24492,
24495,0,24493,
24508,0,24497,
24509,0,24500,
24510,0,24501,
24511,0,24502,
24512,0,24503,
24513,0,24504,
24514,0,24505,
24515,0,24506,
24516,0,24507,
24517,0,24494,
24518,0,24490,
24519,0,24495,
24520,0,24508,
24521,0,24509,
24522,0,24510,
24523,0,24511,
24524,0,24512,
24525,0,24513,
24526,0,24514,
24527,0,24515,
24528,0,24516,
24547,0,24545,
24548,0,24547,
24556,0,24549,
24557,0,24550,
24558,0,24551,
24559,0,24552,
24560,0,24553,
24561,0,24554,
24562,0,24555,
24563,0,24556,
24565,0,24557,
24566,0,24558,
24567,0,24559,
24568,0,24560,
24569,0,24561,
24570,0,24562,
24580,0,24577,
24581,0,24578,
24582,0,24579,
24584,0,24583,
24588,0,24586,
24589,0,24587,
24599,0,24597,
24607,0,24603,
24608,0,24605,
24609,0,24604,
24631,0,24629,
24632,0,24630,
24633,0,24631,
24634,0,24632,
24637,20256,0,
24641,0,24640,
24654,20295,0,
24655,20296,0,
24656,0,24654,
24657,0,24655,
24703,20380,0,
24704,0,24703,
24715,20393,0,
24726,20402,0,
24727,20402,0,
24801,20452,0,
24802,0,24801,
24805,20454,0,
24806,20455,0,
24807,20456,0,
24827,6265,0,
24845,0,24844,
24846,20481,0,
24847,20480,0,
24848,20479,0,
24849,20476,0,
24850,20477,0,
24851,20478,0,
24855,0,24846,
24856,0,24847,
24859,0,24848,
24860,0,24849,
24861,0,24850,
24862,0,24851,
24863,20371,0,
24872,18715,0,
24873,18713,0,
24874,20416,0,
24885,20418,0,
24887,20419,0,
24888,20420,0,
24889,20432,0,
24890,20433,0,
24891,20435,0,
24892,20436,0,
24895,20447,0,
24896,20448,0,
24897,20449,0,
24898,20450,0,
24901,20538,0,
24902,20539,0,
24903,20537,0,
24908,0,24901,
24909,0,24902,
24911,0,24903,
24912,20549,0,
24913,20551,0,
24914,20550,0,
24915,0,24912,
24916,0,24913,
24917,0,24914,
24940,20575,0,
24941,0,24940,
24978,0,24974,
24979,0,24975,
24980,0,24976,
24981,0,24977,
25013,0,25008,
25014,0,25009,
25015,0,25010,
25016,0,25011,
25017,0,25012,
25077,0,25076,
25087,0,25072,
25088,0,25073,
25089,0,25074,
25090,0,25078,
25091,0,25079,
25092,0,25080,
25093,0,25081,
25094,0,25082,
25095,0,25083,
25096,0,25084,
25097,0,25086,
25124,20744,0,
25125,20745,0,
25126,20746,0,
25127,20747,0,
25128,20750,0,
25129,20749,0,
25130,20748,0,
25132,0,25124,
25133,0,25125,
25134,0,25126,
25135,0,25127,
25136,0,25128,
25137,0,25129,
25138,0,25130,
25146,7068,0,
25147,0,25146,
25347,20844,0,
25350,0,25314,
25352,0,25315,
25353,0,25316,
25354,0,25286,
25355,0,25288,
25356,0,25289,
25398,0,25290,
25399,0,25291,
25400,0,25292,
25401,0,25359,
25402,0,25357,
25403,0,25361,
25404,0,25294,
25405,0,25295,
25406,0,25296,
25407,0,25297,
25408,0,25298,
25409,0,25299,
25411,0,25300,
25412,0,25347,
25413,0,25302,
25414,0,25304,
25415,0,25306,
25416,0,25345,
25417,0,25307,
25418,0,25309,
25419,0,25311,
25600,20949,0,
25658,0,25659,
25659,21023,0,
25662,13931,0,
25664,21023,0,
25666,0,25664,
25673,0,25674,
25704,21072,0,
25705,0,25704,
25719,21111,0,
25763,21109,0,
25764,21107,0,
25765,21106,0,
25784,21042,0,
25785,21136,0,
25843,21158,0,
25845,21161,0,
25847,21160,0,
25850,21174,0,
25854,21171,0,
25856,21171,0,
25861,21175,0,
25910,0,25908,
25915,0,25782,
25917,0,25916,
25919,0,25894,
25920,0,25918,
25921,21206,0,
25922,21207,0,
25923,21208,0,
25924,21209,0,
25925,21210,0,
25927,21201,0,
25928,21202,0,
25929,21203,0,
25930,21204,0,
25931,21205,0,
25932,21196,0,
25933,21197,0,
25934,21198,0,
25935,21199,0,
25936,21200,0,
25939,0,25895,
25940,0,25304,
25946,0,25898,
25948,0,25890,
25951,0,25899,
25954,21217,0,
25955,0,25954,
25958,0,25286,
25959,0,25289,
25960,0,25288,
25961,0,25290,
25962,0,25291,
25963,0,25292,
25964,0,25357,
25965,0,25361,
25966,0,25359,
25967,0,25294,
25968,0,25295,
25969,0,25296,
25970,0,25297,
25971,0,25298,
25972,0,25299,
25973,0,25300,
25974,0,25347,
25976,0,25302,
25977,0,25304,
25978,0,25306,
25979,0,25345,
25980,0,25307,
25981,0,25309,
25982,0,25311,
25983,0,25314,
25984,0,25315,
25985,0,25316,
26011,21277,0,
26012,0,26011,
26065,0,26064,
26085,21340,0,
26086,21341,0,
26087,21342,0,
26088,0,26085,
26089,0,26086,
26091,0,26087,
26094,0,26090,
26095,0,26086,
26184,0,26177,
26185,0,26178,
26186,0,26179,
26189,0,26187,
26190,0,26188,
26202,0,26201,
26206,21519,0,
26207,21212,0,
26265,21536,0,
26277,21546,0,
26278,0,26277,
26279,21278,0,
26280,0,26279,
26375,21711,0,
26403,21154,0,
26407,21542,0,
26411,0,26403,
26413,0,26407,
26416,21558,0,
26417,21559,0,
26418,21557,0,
26420,21589,0,
26421,21590,0,
26422,21592,0,
26423,21571,0,
26424,21574,0,
26425,21576,0,
26426,21714,0,
26427,21716,0,
26428,21718,0,
26429,0,26416,
26430,0,26417,
26431,0,26418,
26432,0,26420,
26433,0,26421,
26434,0,26422,
26435,0,26423,
26436,0,26424,
26437,0,26425,
26438,0,26426,
26439,0,26427,
26440,0,26428,
26442,21569,0,
26443,21570,0,
26444,0,26442,
26445,0,26443,
26574,0,20116,
26665,21975,0,
26668,21816,0,
26670,21818,0,
26671,21819,0,
26672,21821,0,
26673,21823,0,
26674,21822,0,
26675,21820,0,
26676,21817,0,
26901,21979,0,
26921,22260,0,
26973,22114,0,
26974,13583,0,
27057,2581,0,
27058,2581,0,
27059,2581,0,
27146,22048,0,
27242,22178,0,
27244,22160,0,
27245,22159,0,
27246,22163,0,
27247,22161,0,
27248,22162,0,
27503,21980,0,
27504,22155,0,
27505,22164,0,
27506,22154,0,
27507,22156,0,
27509,21981,0,
27510,21975,0,
27511,22165,0,
27512,22166,0,
27513,22158,0,
27515,22157,0,
27519,22167,0,
27520,22168,0,
27523,22169,0,
27524,22171,0,
27525,22170,0,
27529,22172,0,
27537,22048,0,
27542,22047,0,
27544,21984,0,
27558,22050,0,
27560,22049,0,
27562,22052,0,
27563,22051,0,
27566,22056,0,
27585,22197,0,
27586,22198,0,
27587,22196,0,
27588,22195,0,
27589,22194,0,
27590,22191,0,
27591,0,27585,
27592,0,27586,
27593,0,27587,
27594,0,27588,
27595,0,27589,
27596,0,27590,
27658,22246,0,
27659,22248,0,
27660,22249,0,
27664,22131,0,
27665,22132,0,
27666,22133,0,
27667,22262,0,
27668,22263,0,
27669,22136,0,
27670,22135,0,
27671,22134,0,
27682,0,27681,
27684,0,27683,
27700,22283,0,
27701,22284,0,
27702,22285,0,
27703,22287,0,
27704,22286,0,
27705,22283,0,
27706,22288,0,
27707,22288,0,
27708,22291,0,
27709,22289,0,
27710,22290,0,
27711,22293,0,
27712,22292,0,
27713,22294,0,
27714,22296,0,
27715,22295,0,
27716,22297,0,
27717,22298,0,
27718,22299,0,
27719,22300,0,
27724,22251,0,
27725,22252,0,
27726,0,27658,
27727,0,27659,
27728,0,27660,
27729,0,27724,
27730,0,27725,
27735,22046,0,
27738,22048,0,
27739,22048,0,
27752,21946,0,
27754,22115,0,
27755,21986,0,
27756,21983,0,
27821,0,27799,
27822,0,27800,
27823,0,27801,
27829,22385,0,
27830,22384,0,
27832,22383,0,
27833,0,27829,
27834,0,27832,
27835,0,27830,
27838,0,27837,
27843,0,27841,
27844,0,27842,
27845,0,27681,
27875,0,27870,
27876,0,27871,
27922,22484,0,
28205,22654,0,
28207,22652,0,
28208,22658,0,
28209,22655,0,
28210,22660,0,
28211,0,28210,
28212,0,28205,
28213,0,28207,
28214,0,28208,
28215,0,28209,
28219,22661,0,
28220,22662,0,
28221,22663,0,
28222,22664,0,
28223,22666,0,
28224,22665,0,
28228,0,28219,
28229,0,28220,
28230,0,28221,
28231,0,28222,
28232,0,28223,
28233,0,28224,
28242,22669,0,
28243,22670,0,
28244,22671,0,
28245,0,28242,
28248,0,28243,
28249,0,28244,
28251,0,28242,
28252,0,28244,
28253,0,28243,
28254,0,28219,
28255,0,28220,
28256,0,28221,
28257,0,28222,
28258,0,28223,
28259,0,28224,
28260,0,28207,
28261,0,28205,
28262,0,28209,
28263,0,28208,
28284,0,28270,
28285,0,28272,
28286,0,28271,
28287,22719,0,
28319,23194,0,
28320,23195,0,
28321,23196,0,
28324,22727,0,
28327,22728,0,
28328,0,28327,
28343,0,27685,
28439,22754,0,
28461,22762,0,
28462,22763,0,
28463,22764,0,
28464,0,28461,
28465,0,28462,
28466,0,28463,
28472,22759,0,
28473,22760,0,
28474,22761,0,
28475,0,28472,
28476,0,28473,
28477,0,28474,
28480,22756,0,
28481,22757,0,
28482,22758,0,
28483,0,28480,
28484,0,28481,
28485,0,28482,
28532,22822,0,
28611,0,28610,
28612,22895,0,
28613,0,28612,
28745,23024,0,
28885,19822,0,
28886,19823,0,
28908,19824,0,
28909,19825,0,
28919,19826,0,
28920,19827,0,
28921,19831,0,
28923,19829,0,
28926,19830,0,
28929,19832,0,
28930,19833,0,
28935,19834,0,
28937,19835,0,
28939,19836,0,
28940,19838,0,
28941,19839,0,
28942,19840,0,
28943,19841,0,
28945,19842,0,
28946,19843,0,
28949,20034,0,
28951,19845,0,
28952,19846,0,
28954,20033,0,
28956,19849,0,
28958,19848,0,
28959,19828,0,
29009,21407,0,
29010,21409,0,
29011,21408,0,
29012,21401,0,
29013,21403,0,
29014,21402,0,
29015,21413,0,
29016,21415,0,
29017,21414,0,
29018,21395,0,
29019,21397,0,
29020,21396,0,
29021,21410,0,
29022,21412,0,
29023,21411,0,
29024,21404,0,
29025,21406,0,
29026,21405,0,
29027,21398,0,
29028,21400,0,
29030,21399,0,
29031,21416,0,
29032,21418,0,
29033,21417,0,
29034,21392,0,
29036,21394,0,
29037,21393,0,
29099,23184,0,
29101,23182,0,
29102,23183,0,
29116,23211,0,
29130,23179,0,
29132,23180,0,
29133,23181,0,
29156,23227,0,
29167,0,29166,
29229,0,29228,
29344,13582,0,
30021,23684,0,
30046,0,30021,
30047,23683,0,
30048,0,30047,
30139,23705,0,
30182,23709,0,
30185,23710,0,
30186,23712,0,
30188,23713,0,
30189,23714,0,
30192,23716,0,
30193,23720,0,
30996,0,30965,
31017,0,31016,
31020,0,31018,
33389,0,33388,
33392,0,33391
);

$existingItems = array();
$r = mysql_query('SELECT entry FROM item_template');
while ($d = mysql_fetch_array($r))
    $existingItems[$d[0]] = true;

$invalidSpells = array();
for ($i = 0; isset($spells[3*$i]); ++$i)
{
    $spellId = $spells[3*$i];
    $createdItem = $spells[3*$i + 1];
    if (!isset($existingItems[$createdItem]))
        $invalidSpells[$spellId] = true;
}
for ($i = 0; isset($spells[3*$i]); ++$i)
{
    $spellId = $spells[3*$i];
    $learnedSpellId = $spells[3*$i + 2];
    if (isset($invalidSpells[$learnedSpellId]))
        $invalidSpells[$spellId] = true;
}
$qry = '';
foreach ($invalidSpells as $id => $trueValue)
{
    if ($qry != '')
        $qry .= ', ';
    $qry .= $id;
}
echo 'DELETE FROM item_template WHERE spellid_1 IN ('.$qry.');'
?>
